Skip to main content

Get Emails from POP

Description

Use the process entry to retrieve email messages and attachments from a POP3, IMAP, or MBOX mail server. The process saves the files to a target directory or manages the messages on the server based on defined filter criteria.

Configurations

Field NameDescription
Process Entry nameSpecify a unique name to identify the process entry on the workspace canvas. You can place a process entry on the canvas multiple times; however, each instance requires a unique name.
Source HostSpecify the host address of the mail server.
The field accepts static or an environment variable value, such as ${MAIL_SERVER}.
Examples:
For Gmail IMAP: imap.gmail.com
For Gmail POP3: pop.gmail.com
Use SSLSelect the checkbox to establish a secure, encrypted connection to the mail server using Secure Sockets Layer (SSL). Secure connections apply to POP3, IMAP, and MBOX protocols.
Many public mail providers mandate secure connections.
For example, incoming connections to the Gmail IMAP server (imap.gmail.com:993) and the Gmail POP server (pop.gmail.com:995) strictly require SSL.
PortSpecify the port to run the SSL POP connection over.
UsernameSpecify the username for the target mailbox.
The field accepts static or an environment variable value,
PasswordSpecify the password associated with the target username. The system encrypts the password when you save the configuration.
The field accepts static or an environment variable value,
Use proxySelect the checkbox to route the mail server connection through a proxy.
Proxy HostSpecify the Server Host Name or IP address of the proxy.
Proxy PortSpecify the port number of the proxy.
Proxy UsernameSpecify the username to authenticate with the proxy server.
Note: Use the field only if your proxy requires authentication.
Proxy PasswordSpecify the password to authenticate with the proxy server. The system encrypts the password when saved the configuration.
ProtocolSelect a protocol of the server to retrieve emails.
Available options are:
- POP3
- IMAP
- MBOX
Default value: POP3
Target folder:The fields are available only if the Action field is selected as Get messages from Settings tab.
Target directorySpecify the directory in which you want to put the mail files
Or
Click Select target folder button and select the target directory.
The field accepts static or environment variable value
Create folderSelect the checkbox to create a folder at target directory.
Target filename patternSpecify the filename pattern (start of filename)
Default Value: name_{SYS|hhmmss_MMddyyyy|}_#IdFile#.mail
Save message contentSelect the checkbox to save the message content to the target folder.
Get mail attachment?Select the checkbox to get the file attachments to the target folder
Different folder for attachment?Select the checkbox to select the different folder for attachment.
Attachment files folderSpecify the target folder to save attachments.
Or
Click Select target folder and select the target folder.
The field accepts static or environment variable value
Note: The field is enabled if the Different folder for attachment? Checkbox is selected.
Attachment wildcardSpecify the file wildcard expression to download the attachments.
Sanitize attachment filenamesSelect the checkbox to replace unsupported characters in attachment filenames with an underscore (_) before saving. To prevent file path errors, the system replaces non-printable control characters and the following specific characters: \, /, :, *, ?, ", <, >, |, and %.
Example: A file originally named Q1: Report <Draft>.pdf saves safely as Q1_ Report _Draft_.pdf.
Settings tab:Define the actions to perform on the retrieved messages, along with protocol-specific retrieval and timeout configurations on the Settings tab.
ActionSelect the action for the message.
Available options are:
- Get message
- Move messages to folder
- Delete message.
POP3 settings:POP3 Settings are enabled if you select POP3 as the connection protocol in the General tab.
RetrieveSelect the retrieval scope. You can choose to retrieve all emails or limit the retrieval to a specific number of messages.
Available retrieve options are:
- All emails
- Retrieve first... emails
Example: Select All emails to process the entire inbox or select Retrieve first... emails to fetch a smaller batch for processing.
Retrieve the … first emailsSpecify the maximum number of emails to fetch.
Notes:
- This value must be less than or equal to the total number of emails present in the inbox.
- The field is available only if Retrieve is selected as Retrieve first... emails
The field accepts static or environment variable value.
Example: Type 50 to retrieve only the first 50 emails from the server.
Delete emails after retrievalSelect the checkbox to permanently delete the messages from the mail server after the step successfully retrieves them.
IMAP settings:IMAP Settings are enabled if you set the Protocol as IMAP or MBOX from the General tab.
IMAP folderSelect the folder path from which you want to retrieve the email.
Or
Click Select a folder to select folder path to retrieve the email.
And
Click Test folder to check if the folder is accessible or not.
The field accepts static or environment variable value.
Include subfoldersSelect the checkbox if you want to include subfolders in the path.
RetrieveSelect the category of emails to fetch from the folder.
Available options are:
- Get all messages: Retrieves every message in the folder without applying filters.
- Get new messages: Retrieves messages flagged as newly arrived (RECENT) and not yet seen by any client.
- Get old messages: Retrieves messages that are not flagged as new.
- Get read messages: Retrieves messages marked as read (SEEN).
- Get unread messages: Retrieves messages not marked as read.
- Get flagged messages: Retrieves marked or starred messages (FLAGGED).
- Get not flagged messages: Retrieves messages without a mark or star.
- Get draft messages: Retrieves messages marked as drafts (DRAFT).
- Get not draft messages: Retrieves messages not marked as drafts.
- Get Answered messages: Intended to retrieve answered messages. Note: We recommend avoiding the option because the feature remains under development.
- Get not Answered messages: Intended to retrieve unanswered messages. Note: We recommend avoiding the option because the feature remains under development.
Retrieve the … first emailsSpecify the maximum number of emails to retrieve from the server.
The field accepts static or environment variable value.
Default value: 0
After retrievedSelect the action to perform after retrieving the email.
Available options are:
- Do nothing
- Delete message
- Move message to folder
Move to folderSelect the folder to which you want to move the retrieved email.
Or
Click Select a folder button to select folder path to retrieve the email.
And
Click Test folder to check if the folder is accessible or not.
The field accepts static or environment variable value
Note: The field is available only if the After retrieved field is set as Move message to folder
Create folderSpecify the IMAP folder where emails should be moved after they are processed. This feature works only with IMAP (not supported for POP3).
The field supports both static and environment variable values, for example, ${ARCHIVE_FOLDER}
Click Test folder to verify whether the specified destination folder exists on the mail server. This helps validate the folder path before running the workflow.
To move the email to the folder:
Enter the folder name or full path where emails should be moved.
For example,
- INBOX/Processed
- Archive/2024
- Completed
Important:
- Use the forward slash (/) to define folder hierarchy. For example, INBOX/Processed.
- Leave the field empty to disable email movement. Use variables to define IMAP folder, such as ${myVariable} or %%myVariable%%
Examples:
- INBOX/Archive- Moves emails to Archive inside Inbox
- Processed- Moves emails to Processed folder
- ${MOVE_TO_FOLDER} - Uses a variable value
- Archive/${YEAR}/${MONTH} - Moves emails to dynamic folders based on year and month.
Timeout and Protocols:The fields are available only of you select Protocol as IMAP.
Connection timeout (in milliseconds)Specify the socket connection timeout value in milliseconds.
Default value is infinite.
The field accepts static or environment variable value.
Example: Type 30000 to set a 30-second connection timeout limit.
Timeout (in milliseconds)Specify the socket read timeout in milliseconds.
Default value is infinite.
The field accepts static or environment variable value
Example: Type 60000 to allow the system 60 seconds to read the data before timing out
ProtocolsSelect the checkbox of the TLS. You can select a single version or multiple versions depending on your server requirements.
The available versions are:
- TLSv1.0
- TLSv1.1
- TLSv1.2
- TLSv1.3.
Filters tab:Use the Filters tab to define specific criteria based on email message headers. The step evaluates the headers and only processes the messages that match your defined conditions.
Header:
Sender (FROM)Specify a sender email address to filter incoming messages.
Select the adjacent checkbox to negate this filter, which excludes all emails received from the specified sender.
The field accepts static or environment variable value.
Receipient (TO)Specify a recipient email address to filter messages.
Select the adjacent checkbox to negate the filter, which excludes all emails sent to the specified recipient.
The field accepts static or environment variable value.
SubjectSpecify text to filter messages by their subject line. This field supports partial matches.
Select the adjacent checkbox to negate the filter, which excludes all emails containing this subject text.
The field accepts static or environment variable value.
Content:
BodySpecify the content body to add to the email body.
Select the adjacent checkbox to negate the filter, which excludes all emails containing this subject text.
Received date:Select a condition from the drop-down list to filter messages based on the date they were received.
Select the adjacent checkbox to negate the date filter, which excludes emails that fall within your specified date criteria.
Note: The field is enabled only if Protocol is set as IMAP or MBOX
ConditionSelect the required condition to receive the email on a specified date.
Available options are:
- None
- Equal to
- Smaller than
- Greater than
- Between to.. and..
Date 1Specify the primary (from) date and time for your filter condition.
Or
Click date picker icon and select the required date and time
Example: 2026-05-15 14:40:26
Date 2Specify a secondary (To) date and time if your selected condition requires a date range.
Or
Click date picker icon and select the required date and time.
Note: The field is available only if you select Condition as Between to .. and ..